
# 准备镜像
down_images(){
	url=registry.cn-hangzhou.aliyuncs.com/google_containers
	version=$1
	images=(`kubeadm config images list --kubernetes-version=$version|awk -F '/' '{print $2}'`)
	for imagename in ${images[@]} ; do
  		docker pull $url/$imagename
  		docker tag $url/$imagename k8s.gcr.io/$imagename
  		docker rmi -f $url/$imagename
	done
}

# 下载指定版本的镜像.
down_images v1.13.12